package com.ssy.lingxi.platform.manage.serviceimpl.mobile;

import com.ssy.lingxi.common.response.Wrapper;
import com.ssy.lingxi.platform.manage.constant.CommonBooleanEnum;
import com.ssy.lingxi.platform.manage.entity.content.ContentColumn;
import com.ssy.lingxi.platform.manage.repository.ContentColumnRepository;
import com.ssy.lingxi.platform.manage.service.mobile.IColumnMobileService;
import org.springframework.data.domain.Sort;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * mobile - 栏目 - 业务实现层
 * @author fhj
 * @version 2.0.0
 * @date 2021/08/31
 */
@Service
public class ColumnMobileServiceImpl implements IColumnMobileService {

    @Resource
    private ContentColumnRepository contentColumnRepository;

    @Override
    public Wrapper<List<ContentColumn>> all() {
        List<ContentColumn> list = contentColumnRepository.findAllByStatus(CommonBooleanEnum.YES.getCode(), Sort.by("id"));
        return Wrapper.success(list);
    }


}
